﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    x:Class="VMuktiGrid.CustomMenu.ctlMenuItem"
    Height="Auto" Background="{x:Null}" FontSize="18" Foreground="{x:Null}" 
    HorizontalAlignment="Stretch" Padding="0,0,0,5">
    
    <UserControl.Resources>
        <Storyboard x:Key="OnMouseOver">
            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="txtTitle" Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)">
                <SplineColorKeyFrame KeyTime="00:00:00" Value="#FFFFF7F7"/>
                <SplineColorKeyFrame KeyTime="00:00:00.2600000" Value="#FFE18926"/>
            </ColorAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="OnMoudeLeft">
            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="txtTitle">
                <SplineColorKeyFrame KeyTime="00:00:00" Value="#FFE18926"/>
                <SplineColorKeyFrame KeyTime="00:00:00.4600000" Value="#FF000000"/>
                <SplineColorKeyFrame KeyTime="00:00:00.5000000" Value="Black"/>
            </ColorAnimationUsingKeyFrames>
        </Storyboard>
        <!--<Storyboard x:Key="OnMouseClick">
            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="txtTitle" Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)">
                <SplineColorKeyFrame KeyTime="00:00:00" Value="#FFFFFFFF"/>
                <SplineColorKeyFrame KeyTime="00:00:00.6000000" Value="#FFFFFFFF"/>
            </ColorAnimationUsingKeyFrames>
        </Storyboard>-->
    </UserControl.Resources>
    
    <UserControl.Triggers>
        <EventTrigger RoutedEvent="Mouse.MouseEnter" SourceName="txtTitle">
            <BeginStoryboard Storyboard="{StaticResource OnMouseOver}" x:Name="OnMouseOver_BeginStoryboard"/>
        </EventTrigger>
        <EventTrigger RoutedEvent="Mouse.MouseLeave" SourceName="txtTitle">
            <BeginStoryboard x:Name="OnMoudeLeft_BeginStoryboard" Storyboard="{StaticResource OnMoudeLeft}"/>
        </EventTrigger>
        <!--<EventTrigger RoutedEvent="Mouse.MouseDown" SourceName="txtTitle">
            <BeginStoryboard x:Name="OnMouseClick_BeginStoryboard" Storyboard="{StaticResource OnMouseClick}"/>
        </EventTrigger>
        <EventTrigger RoutedEvent="Mouse.MouseDown" SourceName="txtTitle">
            <BeginStoryboard x:Name="OnMouseUp_BeginStoryboard1" Storyboard="{StaticResource OnMouseOver}"/>
        </EventTrigger>-->
    </UserControl.Triggers>

    <Grid x:Name="LayoutRoot" Width="Auto" HorizontalAlignment="Stretch">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="16" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>

        <Image x:Name="imgLeftIcon" Width="16" Height="16" Stretch="Uniform" StretchDirection="Both" Grid.Column="0"/>
        <TextBlock Name="txtTitle" FontFamily="Berlin Sans FB" FontSize="14" Foreground="Black" Text="TextBlock" TextWrapping="Wrap" 
                   Cursor="Hand" Width="Auto" Height="20" Padding="3,3,3,0" FontWeight="Normal" Background="{x:Null}" HorizontalAlignment="Stretch" Grid.Column="1"/>
        <Image x:Name="imgRightIcon" Width="16" Stretch="Uniform" StretchDirection="Both" Height="20" Grid.Column="2" />

        <Border HorizontalAlignment="Stretch" BorderThickness="0,0,0,1" Padding="0,0,0,2" Grid.Column="0" Grid.ColumnSpan="3">
            <Border.BorderBrush>
                <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                    <GradientStop Color="#B2515151" Offset="0"/>
                    <GradientStop Color="#80FFFFFF" Offset="1"/>
                </LinearGradientBrush>
            </Border.BorderBrush>
            
        </Border>
        
        <!--
        <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                    <GradientStop Color="#00515151" Offset="0"/>
                    <GradientStop Color="#B2515151" Offset="1"/>
                </LinearGradientBrush>
        <Border HorizontalAlignment="Stretch" Margin="2,0,2,0" BorderThickness="0,0,0,1" Padding="0,0,0,2" Grid.Column="1">
            <Border.BorderBrush>
                <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                    <GradientStop Color="#B2515151" Offset="0"/>
                    <GradientStop Color="#80FFFFFF" Offset="1"/>
                </LinearGradientBrush>
            </Border.BorderBrush>
        </Border>

        <Border HorizontalAlignment="Stretch" Width="16" BorderThickness="0,0,0,1" Padding="0,0,0,2" Grid.Column="2">
            <Border.BorderBrush>
                <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
                    <GradientStop Color="#00515151" Offset="0"/>
                    <GradientStop Color="#B2515151" Offset="1"/>
                </LinearGradientBrush>
            </Border.BorderBrush>
        </Border>-->
        
    </Grid>
</UserControl>
